const baseConfig=require("../config/baseConfig");
const jwt = require('jsonwebtoken')
function getToken(opt, isAccess) {
    let timout = isAccess ? baseConfig.AccessTimeout : baseConfig.refreshTimeout
    return jwt.sign(opt, baseConfig.secret, { expiresIn: timout })
}



module.exports = {
    getToken
}